import java.util.*;

class Main {
	public static void main(String[] args) {
		System.out.println("请输入全班人数(不要超过8)：");
		Scanner scanner = new Scanner(System.in);

		int n = scanner.nextInt();
		System.out.println("请输入每位同学的数学成绩，用空格分隔，最后回车：");
		ArrayList<Double> allScores = new ArrayList<Double>();
		for (int i = 0; i < n; i++) {
			double score = scanner.nextDouble();
			allScores.add(score);
		}

		double total = 0;
		double highest = 0;
		double average;
		for (int i = 0; i < n; i++) {
			double score = allScores.get(i);
			total += score;
			if (score > highest)
				highest = score;			
		}
		System.out.println("最高分：" + highest);
		System.out.println("平均分：" + total/n);
	}
}
